/*
 * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

package java.lang.annotation;

/**
 * Annotation retention policy.  The constants of this enumerated class
 * describe the various policies for retaining annotations.  They are used
 * in conjunction with the {@link Retention} meta-annotation interface to
 * specify how long annotations are to be retained.
 *
 * <p>注解保留策略。
 * 该枚举类的常量描述了不同的注解保留策略，它们与 @Retention 元注解接口配合使用，以指定注解的保留时长。
 *
 * @author  Joshua Bloch
 * @since 1.5
 */
public enum RetentionPolicy {

    /**
     * Annotations are to be discarded by the compiler.
     *
     * <p>注释应由编译器丢弃。
     */
    SOURCE,

    /**
     * Annotations are to be recorded in the class file by the compiler
     * but need not be retained by the VM at run time.  This is the default
     * behavior.
     *
     * <p>注释应由编译器记录在类文件中，但不必在运行时保留 VM。
     * 这是默认行为。
     */
    CLASS,

    /**
     * Annotations are to be recorded in the class file by the compiler and
     * retained by the VM at run time, so they may be read reflectively.
     *
     * <p>注释应由编译器记录在类文件中，并在运行时由 VM 保留，因此可以 反射 读取它们。
     *
     * @see java.lang.reflect.AnnotatedElement
     */
    RUNTIME
}
